<% title_tag t(".New Repository") %>

<div class="main-content">
  <div class="container">
    <%
      groups = current_user.groups.with_attached_avatar.to_a
      groups.unshift(current_user)
    %>

    <%= react_component "repositories/NewRepository", {
      type: params[:_by],
      provider: params[:provider],
      action: repositories_path,
      repository: @repository.as_rc_json(only: %i[slug name user_id descrption gitbook_url privacy]),
      groups: groups.as_json(only: %i[id slug name], methods: :avatar_url),
    } %>
  </div>
</div>
